

import type { Isystemcity } from './entity';
import type { IPageParams } from '@/types/table'
import request from '@/api/request'
import { arr2tree } from '@/utils';
export function getPageList(params: IPageParams) {
  return request({
    url: `admin/system/city/list`,
    method: 'get',
    params,
    loading: true
  }).then(list => { return { list } })
}

export function systemcityDel(data) {
  return request({
    url: `admin/system/city/delete`,
    method: 'post',
    data
  })
}
// 城市列表
export function cityListTree() {
  return request({
    url: '/admin/system/city/list/tree',
    method: 'get',
  })
}
export function systemcityinfo(id) {
  return request({
    url: `admin/system/city/info/${id}`,
    method: 'get'
  })
}
export function systemcitySelect(id) {
  return request({
    url: `admin/system/city/select`,
    method: 'get'
  })
}

export function systemcityAddup(data) {
  return request({
    url: `admin/system/city/${!data.id ? 'save' : 'update'}`,
    method: 'post',
    data
  })
}
